package com.ruoyi.event.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.AreaName;
import com.ruoyi.common.annotation.ExcelDictFormat;
import com.ruoyi.common.annotation.UserDrugInfo;
import com.ruoyi.common.annotation.UserMemberInfo;
import com.ruoyi.common.convert.ExcelDictConvert;
import lombok.Data;

import java.util.Date;


/**
 * 请假视图对象 event_leave
 *
 * @author strongme
 * @date 2023-02-04
 */
@Data
@ExcelIgnoreUnannotated
public class EventLeaveVo implements EventInfo {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ExcelProperty(value = "id")
    private Long leaveId;

    /**
     * 吸毒人员id
     */
    @ExcelProperty(value = "吸毒人员id")
    private Long userId;

    @UserDrugInfo
    public Object getUserInfo() {
        return userId;
    }

    /**
     * 外出地
     */
    @ExcelProperty(value = "外出地")
    private String wcd;

    @AreaName
    public String getWcdName() {
        return wcd;
    }

    /**
     * 本人联系电话
     */
    @ExcelProperty(value = "本人联系电话")
    private String brlxdh;

    /**
     * 家人联系电话
     */
    @ExcelProperty(value = "家人联系电话")
    private String jrlxdh;

    /**
     * 起始日期
     */
    @ExcelProperty(value = "起始日期")
    private Date qsrq;

    /**
     * 结束日期
     */
    @ExcelProperty(value = "结束日期")
    private Date jsrq;

    /**
     * 担保人
     */
    @ExcelProperty(value = "担保人")
    private String dbr;

    /**
     * 担保人电话
     */
    @ExcelProperty(value = "担保人电话")
    private String dbrdh;

    /**
     * 请假事由
     */
    @ExcelProperty(value = "请假事由")
    private String qjsy;

    /**
     * 图片
     */
    @ExcelProperty(value = "图片")
    private String img;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 审核状态
     */
    @ExcelProperty(value = "审核状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "shzt")
    private String status;

    /**
     * 审批人
     */
    @ExcelProperty(value = "审批人")
    private Long spr;

    @UserMemberInfo
    public Object getSprInfo() {
        return spr;
    }

    /**
     * 审批单位
     */
    @ExcelProperty(value = "审批单位")
    private String spdw;

    private Date createTime;
    private Date updateTime;

    @Override
    public Long getId() {
        return leaveId;
    }

    @Override
    public String getText() {
        return qjsy;
    }

    @Override
    @JsonFormat(pattern = "yyyy-MM-dd")
    public Date getTime() {
        return createTime;
    }
}
